import Vue from "vue"
import VueRouter from "vue-router"

Vue.use(VueRouter);
import { menus } from "@/utils/menus"

const routes = [
    {path:"/",redirect:"/login"},
    {path:"/login",name:"login",component:()=>import("@/views/Login.vue")},
    {
        path: "/index",
        name: "index",
        component: () => import("@/views/Index.vue"),
        redirect: "/index/home",
        children: [
            ...menus
        ]
    },
    // { path: "404", name: "notFount", component: () => import("@/views/errorPage/404.vue") },
    // { path: "*", redirect: { name: "notFount" } }


];
const router = new VueRouter({
    routes,
    mode:"hash",
    base:""
});


export default router;